<?php $this->layout( 'layout', [
	'body_class' => 'channel-page',
	'info' => $info,
	'config' => $config,
] ) ?>

<?php if ( ! $error ) : ?>

<h2 class="page-heading"><?=$this->e( $info['title'] )?></h2>
<p>Channel</p>

<div class="entries">
<?php foreach( $info['entries'] as $entry ) : ?>
	<a class="entry" href="<?=$this->e( $entry['video_url'] )?>">
	<img src="<?=$this->e( $entry['thumbnail_url'] )?>" />
	<p class="title"><?=$this->e( $entry['title'] )?></p>
	</a>
<?php endforeach; ?>
</div>

<div class="page-navigation">
	<div class="left element">
		<?php if ( $info['previous_page_url'] ) : ?>
		<a href="<?=$this->e( $info['previous_page_url'] )?>">&laquo; Previous page</a>
		<?php endif; ?>
	</div>
	<div class="right element">
		<?php if ( $info['next_page_url'] ) : ?>
		<a href="<?=$this->e( $info['next_page_url'] )?>">Next page &raquo;</a>
		<?php endif; ?>
	</div>
</div>

<?php else : ?>

<div class="error msg">Error: <?=$this->e($error)?></div>

<?php endif; ?>
